package com.example.huadi1.mapper;

import com.example.huadi1.dto.StuGetBook;
import com.example.huadi1.utils.Response.ClassGetBook;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StuGetBookMapper {
    StuGetBook selectStuGetBook(@Param("textbookId") int textbookId, @Param("stuId") int stuId);

    void insertStuGetBook(StuGetBook stuGetBook);

    void updateStuGetBook(StuGetBook stuGetBook);

    void deleteStuGetBook(@Param("textbookId") int textbookId, @Param("stuId") int stuId);

    void confirmClassGetBook(Integer stuId);

    List<StuGetBook> selectStuGetBookByUserId(Integer userId);
    Integer selectIsReturnBook(@Param("textbookId") int textbookId, @Param("stuId") int stuId);

    List<StuGetBook> selectAllByClassNum(Integer ClassNum);

    StuGetBook selectStuGetBookByClassGet(@Param("textbookId")Integer textbookId, @Param("stuId")Integer userId);

    List<StuGetBook> selectAllByClassNumAndTextbookId(Integer userId, Integer textbookId);

    List<StuGetBook> selectStuGetBookByUserIdAndClassGet(Integer userId);

    List<Integer> selectTextbookIdByClassNum(Integer userId);
}